package com.gotop.common.utils.support;

import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.ArrayList;
import java.util.List;

/**
 * @program: cem
 * @description:
 * @author: superfish
 * @create: 2020-12-28 18:03
 **/
@ConfigurationProperties("cem.xss")
public class XssProperties {
    private Boolean enabled = true;
    private List<String> skipUrl = new ArrayList();

    public XssProperties() {
    }

    public Boolean getEnabled() {
        return this.enabled;
    }

    public List<String> getSkipUrl() {
        return this.skipUrl;
    }

    public void setEnabled(final Boolean enabled) {
        this.enabled = enabled;
    }

    public void setSkipUrl(final List<String> skipUrl) {
        this.skipUrl = skipUrl;
    }

    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof XssProperties)) {
            return false;
        } else {
            XssProperties other = (XssProperties)o;
            if (!other.canEqual(this)) {
                return false;
            } else {
                Object this$enabled = this.getEnabled();
                Object other$enabled = other.getEnabled();
                if (this$enabled == null) {
                    if (other$enabled != null) {
                        return false;
                    }
                } else if (!this$enabled.equals(other$enabled)) {
                    return false;
                }

                Object this$skipUrl = this.getSkipUrl();
                Object other$skipUrl = other.getSkipUrl();
                if (this$skipUrl == null) {
                    if (other$skipUrl != null) {
                        return false;
                    }
                } else if (!this$skipUrl.equals(other$skipUrl)) {
                    return false;
                }

                return true;
            }
        }
    }

    protected boolean canEqual(final Object other) {
        return other instanceof XssProperties;
    }


    public String toString() {
        return "XssProperties(enabled=" + this.getEnabled() + ", skipUrl=" + this.getSkipUrl() + ")";
    }
}